package cn.wolfcode.wolf2w.repository;

import cn.wolfcode.wolf2w.domain.UserInfo;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * 持久化接口
 */
public interface UserInfoRepository extends MongoRepository<UserInfo,String> {
    UserInfo findByPhone(String phone);

    /**
     * 通过城市去进行查找对应的用户
     * @param city
     * @return
     */
    List<UserInfo> queryByCity(String city, Pageable pageable);
}
